package org.activequant.data.retrieval;
import org.activequant.container.services.ITimeStampService;
import org.activequant.core.domainmodel.marketscanner.ScanDataEntity;
import org.activequant.util.pattern.events.IEventSink;

/**
 * Interface of a generic market data replay service. Used for simulating live market via historic data.<br/>
 * An interface. IScanDataReplayService extends Iterable&lt;ScanDataEntity&lt;?&gt;&gt;, IEventSink&lt;ScanDataEntity&lt;?&gt;&gt;, ITimeStampService. Defines the following methods:
 * <ul>
 * <li>IMarketScanSubscriptionSource getMarketScanSubscriptionSource();</li>
 * <li>int getStreamsSize();</li>
 * </ul>
 * Inherits the following methods:
 * <ul>
 * <li>Iterator&lt;T&gt; iterator();</li>
 * <li>void fire(T e);</li>
 * <li>TimeStamp currentTimeStamp();</li>
 * </ul>
 *  @author Dimitar Misev
 */
public interface IScanDataReplayService extends Iterable<ScanDataEntity<?>>, IEventSink<ScanDataEntity<?>>, ITimeStampService {
	
	/**
	 * MarketScan subscription source. Subscription requests will be translated into
	 * historic requests, and latter will be aligned according to the timestamp with
	 * other streams, and accessible via Iterable part of the interface.
	 * 
	 * @return marketScan subscription source.
	 */
	IMarketScanSubscriptionSource getMarketScanSubscriptionSource();	
	
	int getStreamsSize();
}